
import os,sys

from ComputerVisionSystem import ComputerVisionSystem
from BaseBlocks import ImagePipeline,ImagePreview
from CommonBlocks import ImageCapture_OpenCV,ImageProcessor_HSVRange

pipeline = ImagePipeline(ImageCapture_OpenCV(0),
                        [   
                            ImagePreview('imagePreview1'),
                            ImageProcessor_HSVRange('HSVRange1'),
                            ImagePreview('imagePreview2')
                        ],
                        5
                        )
    
system = ComputerVisionSystem(pipeline,'arguments.json')
system.loadJsonArguments()
retCode = system.exec()
system.cleanup()
sys.exit(retCode)